package com.ynny.librarysystemmanager.service;

import com.github.pagehelper.PageInfo;
import com.ynny.librarysystemmanager.entity.Book;
import com.ynny.librarysystemmanager.entity.BookDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookService {

    // 查询所有图书
    List<Book>findAllBooks(Book book);

    // 根据ID查询单个图书
    Book findBookById(Integer bookId);

    // 添加图书
    int addBook(Book book);

    // 修改图书是否可用
    int disableBook(@Param("bookId") int bookId ,
                   @Param("status") int status);

    // 修改图书
    int editBook(Book book);

    PageInfo page(BookDTO dto);

}
